package com.lhh.algorithmservice.config;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;

/**
 * @author 李厚航
 */
@Data
@ConfigurationProperties(prefix = "spark")
@Configuration
public class SparkConfigurationProperties {

    private String appName;

    private String master;

    private String dataPath;

    private String scorePath;

    private String modelPath;

    private UserVideoScoreWeight userVideoScoreWeight;

    private DataSource dataSource;

    private Boolean dllAnalysis;

    private String dllPath;

    @Data
    public static class UserVideoScoreWeight{
        private Double like;
        private Double collect;
        private Double comment;
        private Double history;
    }

    @Data
    public static class DataSource{
        private String url;
        private String username;
        private String password;
        private String driverClassName;
    }

}
